package GUI;

import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

public class PorC extends JFrame {

	private JPanel contentPane;
	private CrOMng manager;
	private MainMenu main;
	private Member mem;

	/**
	 * Create the frame.
	 */
	public PorC() {
		setTitle("Members");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 300, 230);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JMenuBar menuBar = new JMenuBar();
		menuBar.setBounds(0, 0, 434, 20);
		contentPane.add(menuBar);
		
		JButton btnItem = new JButton("Private");
		btnItem.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				mem = new Member("new", "p");
				mem.setVisible(true);
				dispose();
			}
		});
		btnItem.setBounds(30, 50, 100, 50);
		contentPane.add(btnItem);
		
		JButton btnProduct = new JButton("Company");
		btnProduct.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				mem = new Member("new", "c");
				mem.setVisible(true);
				dispose();
			}
		});
		btnProduct.setBounds(150, 50, 100, 50);
		contentPane.add(btnProduct);
		
		JButton btnBackToMainMenu = new JButton("Back");
		btnBackToMainMenu.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				MainMenu.getInstance().setVisible(true);
				dispose();
			}
		});
		btnBackToMainMenu.setBounds(150, 120, 100, 50);
		contentPane.add(btnBackToMainMenu);
	}

}
